package demo2.assignment2;

import demo2.assignment2.phone.PhoneType;
import demo2.assignment2.phone.brand.PhoneBrand;
import demo2.assignment2.phone.color.*;

/**
 * Color Factory
 */
public class PhoneColorFactory extends PhoneAbstractFactory{
    @Override
    public PhoneBrand getPhoneBrand(String brand) {
        return null;
    }

    @Override
    public PhoneColor getPhoneColor(String color) {
        switch (color){
            case PhoneType.Color.blue:
                return new Blue();
            case PhoneType.Color.purple:
                return new Purple();
            case PhoneType.Color.white:
                return new White();
            case PhoneType.Color.black:
                return new Black();
        }
        return null;
    }
}
